<template>
    <div id="yeji" ></div>
</template>
<script>
export default{
    mounted() {
        let mychart = this.$echarts.init(document.getElementById('yeji'));
        let data = ['12','30','20','10','40','35','25','21','44','4','16','20']
        let data1 = ['30','20','10','30','25','15','25','21','44','10','16','20']
        mychart.setOption({
            xAxis:{
                type:'category',
                data:['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
            },
            yAxis:{},
            legend:{},
            series:[
                {
                    name:'2023',
                    type:'line',
                    data:data,
                    itemStyle: {
                        color: 'blue' // 设置单个区域的颜色
                    },
                },
                {
                    name:'2022',
                    type:'line',
                    data:data1
                }
            ]
            })
        }
    }

</script>
<style></style>